//index.js
//获取应用实例
const app = getApp()

Page({
  data: {
    tabbar: {},
    swiperList: [{
      Id: 0,
      Type: "image",
      Url: "cloud://shaokao-a188d6.7368-shaokao-a188d6-1258758611/lostAndFound/banner/1.jpg",
      nav: ""
      }, {
      Id: 1,
      Type: "image",
      Url: "cloud://shaokao-a188d6.7368-shaokao-a188d6-1258758611/lostAndFound/banner/2.jpg",
      Nav: ""
    }],
    notifies: [],
    switchUpload: false
  },

  goSearch(){
    wx.navigateTo({
      url: '/pages/search/search',
    })
  },

  onShow: function () {
    app.editTabbar()
  },

  onLoad: function () {
    let _this = this
    wx.cloud.callFunction({
      name: "notify",
      data: {
        $url: 'getNotifies'
      }
    }).then(res => {
      if(res.result.code === 200){
        _this.setData({
          switchUpload: true,
          notifies: res.result.data[0].lists
        })
      }
    })
  },
})